@echo off

set DST_DIR="../client/Assets/GameEx/Network/Protocol/"

if not exist %DST_DIR% md %DST_DIR%

copy "PBRegister.cs" %DST_DIR%\PBRegister.cs

for /r %%i in (*.proto) do call :Protoc %%~nxi
echo building completed...
pause
goto:eof

:Protoc
protoc --proto_path=. --csharp_out=%DST_DIR% %1
goto:eof